<?php if (empty($mascotas)): ?>
<h1>No existe datos todavia</h1>
<?php else: ?>
<div class="grid_12">
<div class="box">
	<div class="header">
		<img src="img/icons/packs/fugue/16x16/shadeless/table-excel.png" width="16" height="16">
	<h3>Mascotas</h3><span></span>
	</div>
</div>
<div class="content">
	<table class="table" id="table-example">
	<thead>
		<tr>
        <th>KCB</th>
		<th>Nombre</th>
		<th>Raza</th>
        <th>Num. Tatuaje</th>
		<th>Cod. CHIP</th>
   		<th>Acciones</th>
	    </tr>
	</thead>
	<tbody>
	<?php foreach ($mascotas as $mascota): ?>
	<?php $id = $mascota['Mascota']['id']; ?>
<tr>
    <td><?php echo $id ?></td>
	<td><?php echo $mascota['Mascota']['nombre']; ?></td>
	<td><?php echo $mascota['Raza']['nombre']; ?></td>
    <td><?php echo $mascota['Mascota']['num_tatuaje']; ?></td>
	<td><?php echo $mascota['Mascota']['chip']; ?></td>	
   <td>
   <?php echo $this->Html->link($this->Html->image('edit.png', array("alt" =>
'Editar', 'title' => 'editar')), array('action' => 'editar', $mascota['Mascota']['id']),
array('escape' => false)); ?>
 <?php
        echo $this->Html->link($this->Html->image("icons/packs/diagona/16x16/049.png",
        array("alt" => "imprimir", 'title'=>"ver")), array('action' => 'ver', $mascota['Mascota']['id']),
        array('escape' => false)); 
 ?>
 <?php
        echo $this->Html->link($this->Html->image("icons/packs/diagona/16x16/062.png",
        array("alt" => "imprimir", 'title'=>'imprimir')), array('action' => 'imprimir', $mascota['Mascota']['id']),
        array('escape' => false)); 
 ?>
     
   </td>
</tr>
<?php endforeach; ?>
	</tbody>   
	</table>
	
</div>
</div>
<?php endif; ?>
<div class="grid_4">
			<div id="blocks" class="box tabbed">
		 		<div class="header">
				<h3>Acciones</h3>
				</div>
				<div class="content">
					<ul id="block-list-icons" class="block-list with-icon tab-content">
						<li class="i-16-calendar">Mascotas</li>
						<li class="i-16-application"><?php echo $this->Html->link('Nueva Mascota',
array('controller' => 'Mascotas', 'action' => 'insertar')) ?></li>
						<li class="i-16-drive">Imprimir</li>
						<li class="i-16-chart">Reportes</li>
						<li class="i-16-balloon">Lorem ipsum</li>
					</ul>
				</div> <!-- End of .content -->
				</div> <!-- End of .box -->
</div> <!-- End of .grid_4 -->
<div class="clear"></div>	
</div>

<script defer>
			$(window).load(function() {
				$('#table-example').dataTable();
				$(window).resize();
			});
</script>